﻿@model ProductDetailsModel.AddToCartModel
@using Nop.Core.Domain.Orders
@if (!Model.DisableWishlistButton)
{
    var addToWishlistText = "";
    if (Model.UpdatedShoppingCartItemId > 0 && Model.UpdateShoppingCartItemType.HasValue && Model.UpdateShoppingCartItemType.Value == ShoppingCartType.Wishlist)
    {
        addToWishlistText = T("Products.Wishlist.AddToWishlist.Update").Text;
    }
    else
    {
        addToWishlistText = T("Products.Wishlist.AddToWishlist").Text;
    }
    <div class="add-to-wishlist">
        <button type="button" id="add-to-wishlist-button-@Model.ProductId" class="button-2 add-to-wishlist-button" data-productid="@Model.ProductId" onclick="AjaxCart.addproducttocart_details('@Url.RouteUrl("AddProductToCart-Details", new {productId = Model.ProductId, shoppingCartTypeId = (int) ShoppingCartType.Wishlist})', '#product-details-form');return false;">@addToWishlistText</button>
    </div>
}